package org.abc.fund.controller.strategy.response;

import lombok.Builder;
import lombok.Data;
import org.abc.fund.entity.funds.FundBasicInfo;

@Data
@Builder
public class FundBasicInfoResponse {
  private String code;
  private String name;
  private String type;

  public static FundBasicInfoResponse fromEntity(FundBasicInfo fund) {
    if (fund == null) return null;
    return FundBasicInfoResponse.builder()
        .code(fund.getCode())
        .name(fund.getName())
        .type(fund.getType())
        .build();
  }
}
